#include <cstdio>
#include <algorithm>
using namespace std;

const int maxn = 10005;
int marbles[maxn];
int n, q, x, kase;

int main() {
  n = q = kase = 0;
  while ((scanf("%d%d", &n, &q) == 2) && n && q) {
    printf("CASE# %d:\n", ++kase);

    int i;
    for (i = 1; i <= n; i++) {
      scanf("%d", &marbles[i]);
    }

    sort(marbles + 1, marbles + 1 + n);
    
    while (q--) {
      scanf("%d", &x);
      int* p = lower_bound(marbles + 1, marbles + 1 + n, x);
      if (marbles[*p]) {
        printf("%d found at %d\n", x, *p);
      }
      else {
        printf("%d not found\n", x);
      }
    }
  }

  return 0;
}
